/*
 * Administrator Functions
 * 
 * functions that will make calls to administrator ajax files
 * 
 * @author : Jason Meulenhoff
 * @mail : mail@kacangboi.com
 * @web : http://kacangboi.com
 * @copyright : KacangNetworks 2010
 * 
 */

function sendUserCommand(username,password,email)
{
	ajaxRequest("../ajax/admin.ajax.php","username="+username+"&password="+password+"&command=adduser&email="+email+"",print);
}

function sendLanguageCommand(language)
{
	ajaxRequest("../ajax/admin.ajax.php","language="+language+"&command=setLanguage",print);
}

function print(oreq)
{
	$("#addComp").html(oreq);
}

function GetLiveValues()
{
	ajaxRequest("../ajax/admin.ajax.php","command=getLive",setValues);
}

function GetLiveUrl()
{
	ajaxRequest("../ajax/admin.ajax.php","command=getUrl",setUrl);
}

function GetPb(pb)
{
	ajaxRequest("../ajax/admin.ajax.php","command=getPb&point="+pb+"",setPb);
}

function SetPb(pb,value)
{
	ajaxRequest("../ajax/admin.ajax.php","command=setPb&point="+pb+"&value="+value+"",geen);
}

function getDisabled()
{
	ajaxRequest("../ajax/admin.ajax.php","command=getdisable",setDisable);
}

function setUrl(oReq)
{
	$('#url').val(oReq);
}

function setValues(oReq)
{
	$('#lang').val(oReq);
}

function geen(oReq)
{
	
}

function setDisable(oReq)
{
	$('#disabled').val(oReq) 
}

function disablelive(bool)
{
	ajaxRequest("../ajax/admin.ajax.php","command=disablelive&value="+bool+"",geen);
}

function setPb(oReq)
{
	$('#pbvalue').val(oReq);
}

function saveUrl(val)
{	
	ajaxRequest("../ajax/admin.ajax.php","command=saveUrl&value="+val+"",geen);
}


function clearchat()
{
	ajaxRequest("../ajax/admin.ajax.php","command=clearchat",geen);
}